Open
Conversation
1 task
maeng-kim
approved these changes
Jul 22, 2025
|
|
||
| import UIKit | ||
|
|
||
| final class AlertBuilder { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 연결된 이슈
📄 작업 내용
Alert을 구현했어요💻 주요 코드 설명
Builder패턴 again
alert창을 띄울 때alertTitle이나buttonTitle등등 다init으로 받는 건 가독성도 별로 좋지 않고, 효율성이 떨어진다고 판단하여builder패턴을 도입해 보았습니다ㅏcustomAlert창이 로그아웃, 회원탈퇴에서만 사용되어 크게 이점은 없는 거 같긴 한데,alertTitle, 그리고action들을 붙여주는 함수들과 마지막으로build하는 함수를 구현했어요📚 참고자료
https://www.hohyeonmoon.com/blog/custom-alert-builder-pattern
👀 기타 더 이야기해볼 점
AlertBuilder.swift파일 안에builder객체와 UI(RoomieAlertViewController) 모두 작성한 상태인데, 분리를 하는 게 맞을지 한 파일에서 관리하는 게 맞을지 고민입니다!Alert에 관한 코드라 한 파일에세ㅓ 관리하는 게 더 좋아보이긴 하는데,, 잘 모르겠네요